<!DOCTYPE HTML>
<html>
<head>
  <script type="text/javascript" src="../extension/third_party/closure/base.js"></script>
  <script type="text/javascript" src="../extension/utils.js"></script>
  <script type="text/javascript">
  goog.require('goog.testing.jsunit');
  goog.require('secureSites');
  </script>
  <script type="text/javascript">
    function testSecureVersionConvertsHttpColonSlashSlashGoogleToHttps() {
      assertEquals('https://www.google.com', secureSites.secureVersionOf('http://www.google.com'));
    }
    
    function testSecureVersionIgnoresCase() {
      assertEquals('https://www.google.com', secureSites.secureVersionOf('HtTP://www.google.com'));
    }
    
    function testSecureVersionIgnoresHttpColonSlashSlashInQuerystring() {
      assertEquals('https://www.google.com?foo=http://', secureSites.secureVersionOf('http://www.google.com?foo=http://'));
    }
    
    function testSecureVersionIgnoresHttpColonSlashSlashInQuerystringForNonHttpPage() {
      assertEquals('ftp://www.google.com?foo=http://', secureSites.secureVersionOf('ftp://www.google.com?foo=http://'));
    }
  </script>
</head>
</html>